package io.github.andeibuite.clip.core.structure

import com.google.gson.JsonObject
import io.github.andeibuite.clip.core.Minecraft
import java.io.File

/**
 * a file for describe the configuration of minecraft.
 * it usually named version.json EXAMPLE: 1.17.1.json.
 * and stored in the same directory as its described game jar.
 * its content will be different for different versions of minecraft!
 */
class Profile private constructor( val value: String )
{

    companion object
    {

        /**
         * create from version.json file
         */
        fun fromFile( string: String ): Profile = fromJson( File(string).readText() )

        /**
         * create from minecraft instance
         */
        fun fromMinecraft( minecraft: Minecraft ): Profile
        {
            TODO()
        }

        /**
         * create from deserialized json string or version.json content
         */
        fun fromJson( string: String ): Profile
        {
            TODO()
        }

        /**
         * create from mojang api
         */
        fun fromMojangAPI( version: String ): Profile
        {
            TODO()
        }

    }

    val argument = JsonObject()

    val mainClass = ""

    val type = ""
}